package com.jr.platform.controller;

import com.jr.platform.generator.CodeGen.PreviewSql;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xy
 */
@RestController
@RequestMapping("/preview")
@RequiredArgsConstructor
public class PreviewSqlController {
    private final PreviewSql previewSql;

    @PostMapping("/sql")
    public String previewViewSql(String json){
      return  previewSql.preview(json);
    }
}
